FROM php:8.0-cli@sha256:946eba793409a9f29f228886472259a194121e859d8998b0387c44048c913e48
COPY base/install_docker_debian.sh /root/install_docker.sh
RUN apt-get update && apt-get install -y sudo &&  \
    /bin/bash /root/install_docker.sh \
    && rm -r /var/lib/apt/lists/*


COPY base/bullseye-source-list /etc/apt/sources.list

ENV COMPOSER_VERSION=1.8.6
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION}
RUN composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
RUN apt-get update && apt-get install -y wget curl unzip libsqlite3-0 git --no-install-recommends && rm -r /var/lib/apt/lists/*
RUN wget http://rdc-public-software.oss-cn-hangzhou.aliyuncs.com/phpunit-6.3.1.phar -O /usr/local/bin/phpunit &&     chmod +x /usr/local/bin/phpunit

COPY binary/jq-linux64 /usr/bin/jq
RUN chmod +x /usr/bin/jq